'use strict';

const db = uniCloud.database()
const dbCmd = db.command
exports.main = async (event, context) => {
	let {relateUuid, wordBankId, studyedWords} = event;
	await db.collection("memorization").where({
		relateUuid,
		wordBankId
	}).update({
		studyedWords: dbCmd.push(studyedWords)
	})
};
